import Vue from "vue";
let v=new Vue();
export const setIsAuthenticated = ({ commit }, data) => {
  commit('setIsAuthenticated', data)
}

export const setUser = ({ commit }, data) => {
  commit('setUser', data)
}
export const setAppletCode=({ commit },data)=>{
  commit('setAppletCode', data)
}
export const setCartLength=({ commit },data)=>{
  v.$http.request({
     method:"post",
            url:"/v1.0/appletLogin/myCar",
            body:data
  }).then((data)=>{
    if(data.code==0){
      let len=data.result.length;
      console.log(len)
      commit('setCartDate', len)
    }
  })
  // setCartDate
}
